<?php
/**
 * The default template for displaying content
 *
 * Used for both single and index/archive/search.
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */
?>

<div class="blog-item" style="margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid #ddd;">
	<div class="row">
		<div class="col-xs-2 col-sm-2 text-right">
			<div class="author" style="margin: 0px 0 30px 0;">
				<?php echo the_date(); ?>
			</div>
		</div>
		<div class="col-lg-10 col-sm-10">
			<div<?php if ( is_single() ) : ?> style="margin-bottom: 40px;"<?php endif; ?>>
				<?php
					if ( is_single() ) :
						the_title( '<h3 style="margin-top: 0px;">', '</h3>' );
					else :
						the_title( sprintf( '<h3 style="margin-top: 0px;"><a href="%s">', esc_url( get_permalink() ) ), '</a></h3>' );
					endif;
				?>
				<?php if ( is_single() ) : ?>
				<div style="margin-top: 20px; margin-bottom: 20px;">
					<div addthis:title='<?php the_title(); ?>' addthis:url='<?=get_permalink(); ?>' class='addthis_toolbox addthis_default_style '>
						<a class='addthis_button_facebook_like' fb:like:layout='button_count'></a>
						<a class='addthis_button_tweet'></a>
						<a class='addthis_counter addthis_pill_style'></a>
					</div>
					<script src='//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-516406a106b23b1c' type='text/javascript'></script>
				</div>
				<?php endif; ?>
				<?php
					/* translators: %s: Name of current post */
					the_content( sprintf(
						__( 'Continue reading %s', 'twentyfifteen' ),
						the_title( '<span class="screen-reader-text">', '</span>', false )
					) );

					wp_link_pages( array(
						'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
						'after'       => '</div>',
						'link_before' => '<span>',
						'link_after'  => '</span>',
						'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
						'separator'   => '<span class="screen-reader-text">, </span>',
					) );
				?>
				<?php if ( !is_single() ) : ?>
				<div class="row">
					<div class="col-lg-6" style="text-align: left;">
						<a href="<?php echo get_permalink() ?>" class="btn btn-theme" role="button">Читать дальше</a>
						<a href="<?php echo get_permalink() ?>#comments" style="margin-left: 20px; font-size: 14px;">Комментариев: <?php echo get_comments_number() ?></a>
					</div>
					<div class="col-lg-6" style="text-align: right;">
						<div style="margin-top: 8px;">
							<div addthis:title='<?php the_title(); ?>' addthis:url='<?=get_permalink(); ?>' class='addthis_toolbox addthis_default_style '>
								<a class='addthis_button_facebook_like' fb:like:layout='button_count'></a>
								<a class='addthis_button_tweet'></a>
								<a class='addthis_counter addthis_pill_style'></a>
							</div>
							<script src='//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-516406a106b23b1c' type='text/javascript'></script>
						</div>
					</div>
				</div>
				<?php else : ?>
				<div style="margin-bottom: 40px;">
					<div style="margin-top: 20px; margin-bottom: 20px;">
						<div addthis:title='<?php the_title(); ?>' addthis:url='<?=get_permalink(); ?>' class='addthis_toolbox addthis_default_style '>
							<a class='addthis_button_facebook_like' fb:like:layout='button_count'></a>
							<a class='addthis_button_tweet'></a>
							<a class='addthis_counter addthis_pill_style'></a>
						</div>
						<script src='//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-516406a106b23b1c' type='text/javascript'></script>
					</div>
				</div>
				<div style="padding: 15px; background-color: #f5f5f5; border: 1px solid #ddd; border-radius: 3px; margin-bottom: 40px;">
					<h3 style="margin-top: 0px;">Следите за нашим прогрессом на пути к 1 000 000 руб.</h3>
					Получайте каждый четверг новый пост из блога на своей Email.<br><br>
					<form action="/blogsubscribe" method="post" target="_blank" class="form-inline">
						<input id="email" name="email" class="form-control input-large" type="text" placeholder="Введите Email" required="">
						<button class="btn btn-theme">Подписаться</button>
					</form>
				</div>
				<div style="margin-bottom: 40px;">
					<h4>Об авторе</h4>
					<div style="min-height: 80px; float: left;">
						<img class="img-responsive left" src="/blog/wp-content/themes/twentyfifteen/img/sf.png" alt="" style="border-radius: 50%; height: 80px; margin-right: 16px; width: 80px;"></div>
					<p><a href="https://www.facebook.com/da.chistov" target="_blank">Дмитрий Чистов</a>, руководитель и основатель <a href="http://copiny.com/" target="_blank">Copiny</a>, инвестор и сооснователь <a href="http://teamdesk.ru/" target="_blank">TeamDesk</a>. Предпринимательство, интернет и клиентский сервис - моя страсть на протяжении 5 последних лет.</p>
				</div>
				<?php endif; ?>
			</div>
		</div>
	</div>
</div>
